<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="./../home.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:pe="http://primefaces.org/ui/extensions">

    <ui:define name="content" >        
        <div class="col-lg-12">
            <h3 class="page-header" id="comercio">
                Asignar  
                <h:outputText value="Can" style="color:#00BFFF;" />
                <h:link value="Regresar a Listado" styleClass="pull-right" style="font-size: 16px; margin-right: 30px;" outcome="list.xhtml" />
            </h3>
        </div>
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-primary">
                    <h:messages id="msg" globalOnly="true" styleClass="list-group" infoClass="list-group-item list-group-item-success"
                                errorClass="list-group-item list-group-item-danger" />
                    <div class="panel-heading" style="font-weight: bold;">Asignacion de Can</div>
                    <div class="panel-body">
                        <div class="row" id="modificarComercio">
                            <div class="col-lg-8 col-lg-offset-1">
                                <h:form id="frmRegistrarUser" styleClass="form-horizontal" >

                                    <div class="form-group has-feedback"> 
                                        <label for="sereno" class="col-sm-5 control-label" style="text-align: right;">Sereno :</label>
                                        <div class="col-sm-5">
                                          <!--  <h:selectOneMenu id="sereno" value="#{serenoPerroBean.sereno.id}" styleClass="form-control" >
                                                <f:selectItem noSelectionOption="true" itemLabel="Seleccionar" itemValue="0" />
                                                <f:selectItems value="#{serenoPerroBean.lstSerenos}" var="list" itemValue="#{list.id}" itemLabel="#{list.nombre}  #{list.apellido}" />
                                            </h:selectOneMenu>-->
                                            <p:autoComplete id="sereno" value="#{serenoPerroBean.nombreSereno}" completeMethod="#{serenoPerroBean.completeText}" />
                                        </div>	
                                    </div>
                                    <div class="form-group has-feedback"> 
                                        <label for="perro" class="col-sm-5 control-label" style="text-align: right;">Can :</label>
                                        <div class="col-sm-5">
                                           <!-- <h:selectOneMenu id="perro" value="#{serenoPerroBean.perro.id}" styleClass="form-control" >
                                                <f:selectItem noSelectionOption="true" itemLabel="Seleccionar" itemValue="0" />
                                                <f:selectItems value="#{serenoPerroBean.lstPerros}" var="list" itemValue="#{list.id}" itemLabel="#{list.nombre}" />
                                            </h:selectOneMenu> -->
                                            <p:autoComplete id="perro" value="#{serenoPerroBean.nombrePerro}" completeMethod="#{serenoPerroBean.completeTextPerro}" />


                                        </div>	
                                    </div>
                                    <br />
                                    <p:commandButton value="Guardar" styleClass="btn btn-primary" actionListener="#{serenoPerroBean.insertaSerernoPerro}" update="@form :msg"/>

                                </h:form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </ui:define>

</ui:composition>
